const BASEURL = "http://www.zydz.icu:3002/"
export function myRequest(options){
	return new Promise((reject,resolve) => {
		uni.request({
			url:BASEURL+options.url,
			method:options.method || "get",
			header:{
				'Content-Type':'application/json'
			},
			data:options.data,
			success(data,statusCode,header,cookies) {
				if(statusCode === 200){
					resolve(data)
				}else {
					reject(data)
				}
			},
			fail(err) {
				options.fail(err)
			}
		})
	})
}